﻿using FB.Data.Models;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FB.Providers.AEInfo
{
    [Table("vw_client_master", Schema = "ae")]
    public class ClientBaseInfo : IPersonalInfo, IFullName
    {      
        [Key]
        public long id { get; set; }

        [MaxLength(1)]
        public string acc_type { get; set; }

        [MaxLength(8)]
        public string code { get; set; }

        [MaxLength(8)]
        public string client_code { get; set; }

        [NotMapped]
        public string LastName { get; set; }
        
        [NotMapped]
        public string FirstName { get; set; }

        [NotMapped]
        public string Alias { get; set; }

        [NotMapped]
        public string FullName { get { return client_name; } }

        [MaxLength(150)]
        public string client_name { get; set; }

        [MaxLength(150)]
        [Column("chinese_name")]
        public string ChineseName { get; set; }

        [MaxLength(4)]
        public string ae_code { get; set; }

        [MaxLength(150)]
        public string ae_name { get; set; }

        [MaxLength(150)]
        public string telephone { get; set; }

        [MaxLength(150)]
        public string hkid { get; set; }

        [MaxLength(150)]
        public string fax { get; set; }

        [MaxLength(150)]
        public string mobile { get; set; }

        [MaxLength(150)]
        public string bank_name { get; set; }

        [MaxLength(150)]
        public string bank_acc { get; set; }

        [MaxLength(1500)]
        public string address { get; set; }

        [MaxLength(200)]
        public string email { get; set; }

        public bool? knowdev { get; set; }

        public bool? allow_marketing { get; set; }

        public bool? is_global { get; set; }
    }
}
